<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>双色球</title>
    <style  type="text/css">
        figure{display:block;background:black;border-radius:56px; line-height:38px;height:40px;width:40px;margin:20px 5px;float:left;text-align:center;color:#FFFFFF;font-weight:bolder;}
        .red{
            background:-webkit-radial-gradient(10px 10px,circle,#ff0000,#000);
            background:-moz-radial-gradient(10px 10px, circle, #ff0000,#000);
            background:-ms-radial-gradient(10px 10px,circle,#ff0000,#000);
            background:radial-gradient(10px 10px,circle,#ff0000,#000);

        }
        .blue{
            background:-webkit-radial-gradient(10px 10px,circle,#0000ff,#000);
            background:-moz-radial-gradient(10px 10px,circle,#0000ff,#000);
            background:-ms-radial-gradient(10px 10px,circle,#0000ff,#000);
            background:radial-gradient(10px 10px,circle,#0000ff,#000);

        }
    </style>
</head>
<body>
<?php
//创建一个1-33的红色球数组
$red_num=range(1,33);
$keys=array_rand($red_num,6);
shuffle($keys);
foreach($keys as $v){
    $red[]=$red_num[$v]<10?('0'.$red_num[$v]):$red_num[$v];
}
$blue_num=rand(1,16);//没有创建数组
$blue=$blue_num<10?('0'.$blue_num):$blue_num;

foreach($red as $v){
    echo "<figure class='red'>$v</figure>";
}
echo "<figure class='blue'>$blue</figure>";
?>


</body>
<html>